ALTER TABLE Statement

Modifies the design of a table after it has been created with the CREATE TABLE statement.


Note The Microsoft Jet database engine does not support the use of ALTER TABLE, or any of the data definition language (DDL) statements, with non-Microsoft Jet databases. Use the DAO Create methods instead.


Syntax

ALTER TABLE table {ADD {COLUMN field type[(size)] [NOT NULL]     [CONSTRAINT index] |
    ALTER COLUMN field type[(size)] |
    CONSTRAINT multifieldindex} |
    DROP {COLUMN field I CONSTRAINT indexname} }

The ALTER TABLE statement has these parts:

Part Description
table The name of the table to be altered.
field The name of the field to be added to or deleted from table. Or, the name of the field to be altered in table.
type The data type of field.
size The field size in characters (Text and Binary fields only).
index The index for field. For more information on how to construct this index see CONSTRAINT Clause.
multifieldindex The definition of a multiple-field index to be added to table. For more information on how to construct this index see CONSTRAINT Clause.
indexname The name of the multiple-field index to be removed.

Remarks

Using the ALTER TABLE statement you can alter an existing table in several ways. You can:

Notes

See Also
ADD USER Statement CREATE USER or GROUP Statement
ALTER USER or DATABASE Statement CREATE VIEW Statement
CONSTRAINT Clause DROP Statement
CREATE INDEX Statement DROP USER or GROUP Statement
CREATE PROCEDURE Statement GRANT Statement
CREATE TABLE Statement REVOKE Statement

Example

ALTER TABLE Statement Example